function [V,T,TE,E,ET] = refine_L_shape(V, T, TE, E, ET, n_round)
% function [V,T,TE,E,ET] = refine_L_shape(V, T, TE,  E, ET, n_round)
%
% This is a specially designed function just for L-shape domain, whichis only
% refined at the original n rounds. We remark that it is always execute once
% at the begining of the program.
%

for count = 1:n_round
    ind = zeros(size(T, 1), 1); % this is the flag for refined element.
    % find out the triangle near to corner (0,0)
    dist = min(V(T(:,3),1).^2 + V(T(:,3),2).^2, V(T(:,1),1).^2 + V(T(:,1),2).^2);
    dist = min(dist, V(T(:,2),1).^2 + V(T(:,2),2).^2);
    ind(dist <= 0.0225*0.25^count) = 1;
    
    edge_mark = mark_edge_longest(V, T, E, TE, ind);
    [V,T,E,ET,TE] = refine_mesh_local(V,T,E,ET,TE,edge_mark);
end
